//
//  LoginApi.m
//  pushNewsManager
//
//  Created by Jobs on 8/18/17.
//  Copyright © 2017 com.Iori. All rights reserved.
//

#import "LoginApi.h"
#import "AESCrypt.h"
#import "NSData+Base64.h"
#import "NSString+Base64.h"
#import "NSData+CommonCrypto.h"

@implementation LoginApi

-(NSString *)requestUrl
{
    return @"/api2/login";
}

-(id)requestArgument
{
//    NSString *str = [AESCrypt decrypt:@"NGKqfvGFIsby%2FXDsg8VIv0UlymhAnR7MXivzAYZ6DKA0n0S%2FlbKXVmdSxBFHbBJ%2FpLsuyrexkKWmgdlksTNmsqAtB8y7ICc%2BizdM6y2ui8M%3D" password:@"U1MjU1M0FDOUZ.Qz"];
//    
//    NSData *encryptedData = [NSData base64DataFromString:@"NGKqfvGFIsby%2FXDsg8VIv0UlymhAnR7MXivzAYZ6DKA0n0S%2FlbKXVmdSxBFHbBJ%2FpLsuyrexkKWmgdlksTNmsqAtB8y7ICc%2BizdM6y2ui8M%3D"];
//    NSData *decryptedData = [encryptedData decryptedAES256DataUsingKey:[[@"U1MjU1M0FDOUZ.Qz" dataUsingEncoding:NSASCIIStringEncoding] SHA256Hash] error:nil];
//    str = [[NSString alloc] initWithData:decryptedData encoding:NSUTF8StringEncoding];
    NSDictionary *param = [self getPropertiesValue];
    NSDictionary *superParam = [super requestArgument];
    NSDictionary *resultDict = [self mergeDict:superParam secondDict:param];
    return [self getAESCryptedWithParam:resultDict];
}

@end
